﻿using System;
using System.Collections.Generic;
using System.Data.OleDb;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using Common;

namespace Print
{
    public partial class Default : Common.PrintPageBase
    {
        private PBLL.PService bllService = new PBLL.PService();
        private PBLL.PLink bllLink = new PBLL.PLink();
        private PBLL.PMenu bllMenu = new PBLL.PMenu();

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                ServiceRpt.DataSource = bllService.GetList("");
                PrintRpt.DataSource = bllService.GetList("");
                LinkRpt.DataSource = bllLink.GetList();
                GetAd(AdRpt, "");
                Page.Header.Title = config.P_Title;
                OleDbDataReader dr = bllMenu.GetDr("MUrl='' or MUrl is null");
                if (dr.Read())
                {
                    bTit.InnerHtml = "<strong>" + dr["MCn"].ToString() + "</strong> <span class=\"soft\">" + dr["MEn"].ToString() + "</span>";
                }
                dr.Close();
                Page.DataBind();
            }
        }
    }
}